﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BizCollegeWebApp.Models.Survey>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Survey Detail
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>Survey Details</legend>
        <table class="no_border_table">
            <tr>
                <td>
                    Title
                </td>
                <td style="width: 20px">
                </td>
                <td>
                    <%: Html.DisplayFor(model => model.Title) %>
                </td>
            </tr>
            <tr>
                <td>
                    Is Active
                </td>
                <td style="width: 20px">
                </td>
                <td>
                    <%: Model.IsActive %>
                </td>
            </tr>
            <% int counter = 1;
               foreach (SurveyQuestion sq in Model.SurveyQuestions)
               { %>
               <tr>
               <td>
               </td>
               <td>
               </td>
               <td></td>
               </tr>
            <tr>
                <td valign="top">
                    Question -
                    <%:counter  %>
                </td>
                <td style="width: 20px">
                </td>
                <td>
                    <%: sq.QuestionText %>
                    <% if (sq.IsMultipleChoice)
                       { %>
                    <p>
                        A)
                        <%: sq.OptionA %>
                    </p>
                    <p>
                        B)
                        <%: sq.OptionB %>
                    </p>
                    <p>
                        C)
                        <%: sq.OptionC %>
                    </p>
                    <p>
                        D)
                        <%: sq.OptionD %>
                    </p>
                    <p>
                        E)
                        <%: sq.OptionE %>
                    </p>
                    <%} %>
                </td>
            </tr>
            <%
                       counter++;
               } %>
        </table>
    </fieldset>
    <p>
        <%: Html.ActionLink("Edit", "Edit", new { id=Model.ID }) %>
        |
        <%: Html.ActionLink("Back to List", "Index") %>
    </p>
</asp:Content>
